﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;

/// <summary>
/// User_Control 的摘要说明
/// </summary>aa
public class User_Control
{
	public User_Control()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}

    public static bool User_Login(string param1, string param2)
    {
        try
        {
            SqlParameter[] parms = new SqlParameter[]{			
			    new SqlParameter("@param1",SqlDbType.NVarChar,20),
			    new SqlParameter("@param2",SqlDbType.NVarChar,20),
                new SqlParameter("@returnValue",SqlDbType.Bit)
                
			};
            parms[0].Value = param1.Trim();
            parms[1].Value = param2.Trim();
            parms[2].Direction = ParameterDirection.ReturnValue;
            Dbase.ExecuteNonQuery(CommandType.StoredProcedure, "UserLogin", parms);
   
            if (parms[2].Value.ToString() == "1")
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        catch (Exception ex)
        {
            return false;
        }
        
    }

}